import { createRouter, createWebHashHistory } from "vue-router";

//  定义路由数据
const routes = [
  {
    path:"/",
    redirect:"/login"
  },
  {
    path: "/login",
    component: () => import("../views/login.vue"),
  },
  {
    path: "/home",
    component: () => import("../views/home.vue"),
  },
];

// 创建router实例
export default createRouter({
  routes,
  history: createWebHashHistory(),
});
